﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using DOAN.DO;
using DOAN.BL;

namespace DOAN
{
    public partial class ThiTracNghiem : System.Web.UI.Page
    {
        public double seconds;

        protected void Page_Load(object sender, EventArgs e)
        {
            seconds = 1 * 60;
            loadMon();
        }

        public void loadMon()
        {
            MonhocDO obj = new MonhocDO();
            DataTable dt = new MonhocBL().SelectAll();
            if (dt.Rows.Count > 0)
            {
                drpMon.DataSource = dt;
                drpMon.DataTextField = "Tenmon";
                drpMon.DataValueField = "Mamonhoc";
                drpMon.DataBind();
            }
        }

        public string getid()
        {
            return txtmade.Text;
        }
        public string getmon()
        {
            return drpMon.Text;
        }
        public int getthoigian()
        {
            DethiDO obj = new DethiBL().Select(new DethiDO { Madethi = int.Parse(txtmade.Text) });
            return obj.Thoigian;
        }

        protected void btn_Click(object sender, EventArgs e)
        {
            Response.Redirect("Lambai.aspx?MaDT=2&Cau=2"); 
        }
    }
}
